<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta name="robots" content="noindex,nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="layui/css/layui.css" />
<link rel="stylesheet" type="text/css" href="css/x.css"/>
<title>新增友情链接</title>
<script src="js/common.js" type="text/javascript"></script>
<script src="js/main.js" type="text/javascript"></script>
<script src="layui/layui.js" type="text/javascript"></script>
</head>
<body>
<!--当前导航-->

<div class="layui-fluid">
  <div class="r_content pd15">
    <div style="overflow-x: auto">

<div class="pda15">添加友情链接：</div>
<form action="?action=add" method="post" class="layui-form">

  
	<div class="layui-form-item">
		<label class="layui-form-label">网站名称：</label>
		<div class="layui-input-block">
			<input type="text" id="webname" name="webname" lay-verify="required" placeholder="请输入网站名称"
				autocomplete="off" class="layui-input" />
		</div>
	</div> 
	<div class="layui-form-item">
		<label class="layui-form-label">网站地址：</label>
		<div class="layui-input-block">
			<input type="text" id="url" name="url" lay-verify="required" placeholder="请输入网站地址"
				autocomplete="off" class="layui-input" />
		</div>
	</div> 
	
	<div class="layui-form-item">
		<label class="layui-form-label">是否显示：</label>
		<div class="layui-input-block">
			<input type="checkbox" name="ischeck"  id="ischeck"  title="是否显示该友情链接" lay-skin="primary" checked  value="1" />
		</div>
	</div>	
	
	<div class="layui-form-item">
		<label class="layui-form-label">链接类型：</label>
		<div class="layui-input-block">
			<select name="v_type" id="v_type"  lay-verify="required" lay-search lay-filter="v_type">
				<option value="">请选择链接类型</option>
				<option value="font">文字链接</option>
				<option value="pic">图片链接</option>
			</select>
		</div>
	</div>	
	<div id="tr_v_pic" class="layui-form-item" style="display:none">
		<label class="layui-form-label">图片地址：</label>
		<div class="layui-input-block">
			<input type="text" id="logo" name="logo" placeholder=""
				autocomplete="off" class="layui-input" />
		</div>
	</div> 
	
	<div class="layui-form-item">
		<label class="layui-form-label">联系方式：</label>
		<div class="layui-input-block">
			<input type="text" id="email" name="email"  placeholder=""
				autocomplete="off" class="layui-input" />
		</div>
	</div> 
	
	<div class="layui-form-item">
		<label class="layui-form-label">排　　序：</label>
		<div class="layui-input-block">
			<input type="text" id="sortrank" name="sortrank"  placeholder=""
				autocomplete="off" class="layui-input" />
		</div>
	</div> 	
	
	<div class="layui-form-item">
		<label class="layui-form-label">网站介绍：</label>
		<div class="layui-input-block">
			<textarea id="msg" name="msg" class="layui-textarea"></textarea>
		</div>
	</div> 
			
	<div class="layui-form-item">
	  <div class="layui-input-block">
		<input type="submit" name="Submit" value="确定提交" lay-submit="" class="layui-btn"/>
		<input type="reset" name="reset" value="清除重置" class="layui-btn layui-btn-primary" />
	  </div>
	</div>
</form>

</div>
</div>
</div>
</body>
<script type="text/JavaScript">
	layui.use(['jquery', 'form'], function(){
		$ = layui.jquery;
		form = layui.form;
		form.on('select(v_type)', function(data){
			if(data.value == "pic"){
				$("#tr_v_pic").css('display','block'); 
				
			}else{
				$("#tr_v_pic").css('display','none'); 
			}
		});	
		
		
	  });
</script>
</html>
